﻿module Lexer

open System.Text
open Microsoft.FSharp.Text.Lexing
open Microsoft.FSharp.Text
open Clexer


let runLexer fileName = 
    let p = Clexer.init fileName
    seq { while not p.IsPastEndOfStream do
            yield Clexer.initial p
          yield EOF(Cabshelper.cabslu)
    }

let runLexerFromString filename line string =
    let p = Errormsg.startParsingFromString filename line string
    [ while not p.IsPastEndOfStream do
          yield Clexer.initial p
          yield EOF(Cabshelper.cabslu)
    ]